package com.xhji.web.mvc.validation;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.annotation.Validated;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

@Configuration
public class ValidationAutoConfiguration {
    @Bean
    public MethodValidationPostProcessor methodValidationPostProcessor() {
        return new ParameterNameValidationMethodValidationPostProcessor(Validated.class);
    }
}
